package logger2.formatter;

import java.text.SimpleDateFormat;
import java.util.Date;

import logger2.LogRecord;

public class SimpleLogFormatter implements LogFormatter {
	private final static SimpleDateFormat sdf= new SimpleDateFormat("HH:mm:ss.SSS");

	@Override
	public String format(LogRecord record) {
		return sdf.format(new Date(record.getTime())) + " - " + record.getLogger() + " - " + record.getLvl() + " : " + "\n\t" + 
				record.getMessage() + "\n\t" + 
				record.getThreadName() + " => " + record.getStackTraceElement();
	}

}
